﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ECommerce.WebControls.Productos
{
    public partial class WebPackage : ECommerce.WebControls.WebObjeto
    {
        public System.Web.UI.WebControls.TextBox txtCantidadXBulto;
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (txtCantidadXBulto == null)
            {
                txtCantidadXBulto = new System.Web.UI.WebControls.TextBox();
            }
        }
        private double cantidadXBulto;
        public double CantidadXBulto
        {
            get { return cantidadXBulto; }
            set { cantidadXBulto = value; }
        }

        public override void Cargar()
        {
            ECommerce.Model.Productos.Package Package = new ECommerce.Model.Productos.Package();
            if (this.Identity != 0)
            {
                Package = ECommerce.DAO.SQL.Productos.Package.GetPackageById(this.Identity);
            }
            base.Cargar(Package);
            ECommerce.Factory.WebControls.Productos.WebPackage.Load(this, Package);
        }
        public void Cargar(ECommerce.Model.Productos.Package Package)
        {
            base.Cargar(Package);
            ECommerce.Factory.WebControls.Productos.WebPackage.Load(this, Package);
        }
        public override void Guardar()
        {
            ECommerce.Model.Productos.Package Package = new ECommerce.Model.Productos.Package();
            ECommerce.Factory.Productos.Package.Load(Package, this);
            base.Guardar(Package);
        }
    }
}
